<?php
namespace App\Lib\PHPExcel\ManuOrder;

use App\Lib\PHPExcel\ExcelHandle;

class TaobaoOrderLiver extends ExcelHandle
{
    /*
     * 主播日成交额
     * */
    public function arrange($origin_arr)
    {

        $arr = [
            0 => [
                '日期','主播','订单数','购买人数','成交金额']
        ];
        $i = 1;
        foreach ($origin_arr as $data) {
            $arr[$i]['日期'] = $data['date'];
            $arr[$i]['主播'] = $data['liver'];
            $arr[$i]['订单数'] = $data['order_count'];
            $arr[$i]['购买人数'] = $data['user_count'];
            $arr[$i]['成交金额'] = $data['actual_payment_amount'];
            $i++;
        }

        return $arr;
    }


}